﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TCEasyPrintRev.Models;

namespace TCEasyPrintRev.Controllers
{ 
    public class TransaksiController 
    {

        //public  static List<string> getALLByID(string id)
        //{
            
          
               
        //        var linq = from x in getALLByID() join y in session.QueryOver<Detail>()
        //                   on x.  
                
                //return  session.QueryOver<Detail>()
               //           .JoinQueryOver<Transaksi>(x => x.transaksi)
               //           .Where(x=> x.member.ID == id).
               //           List().Select(idmember = x.transaksi.ID ,  + x.transaksi.member +"|"+ x.transaksi.kirim +"|"+ x.transaksi.Tanggal +"|"+ x.cetak.ID +"|"+ x.cetak.isDone +"|"+ x.cetak.isvalid)
               //           .ToList();
                        

        
        
        //}

        //public List<Transaksi> getALL()
        //{
        //    using (var session = CRUD<Transaksi>.load().OpenSession())
        //    {

        //        var hqlQuery = string.Format("select * from transaki join i.ItemData left join Users u left join DataStire ds where u.UserId=i.UserId and ds.DataStoreId=i.DataStoreId and (ds.IsGlobal=1 or ds.UserId='{0}')", userId);

        //        session.CreateQuery(hqlQuery).List<Transaksi>();

        //        return session.QueryOver<Transaksi>().Select(y=>y);

        //    }
        //}

        //public static Paket getPaketByID(string id)
        //{
        //    using (var session = CRUD<Paket>.load().OpenSession())
        //    {
        //        return session.QueryOver<Paket>().List().Where(x => x.ID == id).Last();

        //    }
        //}
    }
}